<template>
    <div class="container">
        <Category title="美食" >
            <!-- 下面这段代码会自动填充到插槽中 -->
            <img src="https://wx3.sinaimg.cn/mw690/006q0F1Vly1honuwqnhg9j30tw13ugxl.jpg" >
        </Category>
        <Category title='游戏' >
            <!-- 下面这段代码会自动填充到插槽中 -->
            <ul>
                <li v-for="(item,index) in games" :key="index">{{ item }}</li>
            </ul>
        </Category>
    </div>
</template>
<script>
    import Category from './components/Category.vue'
    export default {
        components: { Category },
        name:'App',
        data(){
            return {
                foods:['火锅','烧烤','小龙虾','牛排'],
                games:['穿越火线','超级玛丽','绝地求生','王者']
            }
        }
    }
</script>
<style>
    .container{
        display: flex;
        /* 水平居中 */
        justify-content: space-around; 
    }
    img{
        width: 100%;
        height: 60%;
    }
</style>

